#include<bits/stdc++.h>
using namespace std;

double calc(double (*f)(double),double a,double b){
    return (b-a)/2*((*f)(a)+(*f)(b));       
}

double f1(double x){
    return x*x;
    
}

double f2(double x){
    if(x==0)
        return 1;
    return sin(x)/x; 
}


int main(){
    double (*f)(double);
    
    int a,b;
    cin>>a>>b; 
        
    cout<<calc(f1,a,b)<<endl;
    cout<<calc(f2,a,b)<<endl;
    
    return 0;
}